<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
    var o={};
    o.func();//这行代码会出错，应为调用了不存在的方法
    console.log('test');//前面的代码出错时，这行代码不会执行
    </script>
</body>
</html>